From: Andy Holmes Date: Sun, 12 Feb 2023 22:15:00 +0000 (-0800) Subject: extensions-tool: Compile GSettings schemas after install X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~405^2^2~13 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=1670b948c4c03b8332030c5456d5fa5747c17a6b;p=gnome-shell.git extensions-tool: Compile GSettings schemas after install Extensions may soon stop shipping compiled GSchemas, so ensure the schemas are compiled after install, as with GNOME Shell. Part-of: --- diff --git a/subprojects/extensions-tool/src/command-install.c b/subprojects/extensions-tool/src/command-install.c index 2eefabafa..11fb4b6b7 100644 --- a/subprojects/extensions-tool/src/command-install.c +++ b/subprojects/extensions-tool/src/command-install.c @@ -95,6 +95,7 @@ install_extension (const char *bundle, g_autoptr (GFile) src = NULL; g_autoptr (GFile) dst = NULL; g_autoptr (GFile) dstdir = NULL; + g_autoptr (GFile) schemadir = NULL; g_autoptr (GError) error = NULL; g_autofree char *cwd = NULL; const char *uuid; @@ -148,6 +149,22 @@ install_extension (const char *bundle, if (!g_file_move (tmpdir, dst, G_FILE_COPY_NONE, NULL, NULL, NULL, &error)) goto err; + schemadir = g_file_get_child (dst, "schemas"); + + if (g_file_query_exists (schemadir, NULL)) + { + g_autoptr (GSubprocess) proc = NULL; + g_autofree char *schemapath = NULL; + + schemapath = g_file_get_path (schemadir); + proc = g_subprocess_new (G_SUBPROCESS_FLAGS_STDERR_SILENCE, &error, + "glib-compile-schemas", "--strict", schemapath, + NULL); + + if (!g_subprocess_wait_check (proc, NULL, &error)) + goto err; + } + return 0; err: